var classify=document.getElementById('h3_silde'),
    list_sidebar=document.querySelector(".list_sidebar"),
    more_choose=document.querySelector(".more_choose"),
    much_choose=document.querySelectorAll(".much_choose"),
    list_sidebar=document.querySelector(".list_sidebar");
    

//全部分类
classify.addEventListener("mouseover",function(){
	list_sidebar.style.display='block';
})
classify.addEventListener("mouseout",function(){
	list_sidebar.style.display='none';
})
list_sidebar.addEventListener("mouseover",function(){
	list_sidebar.style.display='block';
})
list_sidebar.addEventListener("mouseout",function(){
	list_sidebar.style.display='none';
})


//选择
var much_choose=document.querySelectorAll(".much_choose"),
	true_choose=document.getElementsByClassName("true_choose"),
	have=false,
	chek=false,
	more_choose=document.querySelector(".more_choose"),
	hidden_much=document.querySelector(".hidden_much"),
	up_pack=document.querySelector(".up_pack"),
	pitch_on=document.querySelectorAll(".pitch_on"),
	more_p=document.querySelectorAll(".list_detail p");
//	much_after=window.getComputedStyle(much_choose,'::before');
	//多选
	for(var i=0;i<much_choose.length;i++){		
		(function(k){	
			much_choose[k].addEventListener("click", function() {
				if(!have) {
					have = true;
					true_choose[k].setAttribute("style", "display: block;");
					
				} else {
					have = false;
					true_choose[k].setAttribute("style", "display: none;");
				}
			})
		})(i)		
	}
	
	//是否选中状态
	for(var j=0;j<pitch_on.length;j++){
		(function(k){
			more_p[k].addEventListener("click",function(){
				if(!chek){
					chek=true;
					pitch_on[k].classList.add("pitch_off");
				}else{
					chek=false;
					pitch_on[k].classList.remove("pitch_off");
				}
			})
		})(j)
	}
	
	//更多和收起
	more_choose.addEventListener("click",function(){
		hidden_much.style.display='block';
		more_choose.style.display='none';
	})
	up_pack.addEventListener("click",function(){
		more_choose.style.display='block';
		hidden_much.style.display='none';
	})
	
	var h=document.body.scrollTop;
	if(h<124){
		list_sidebar.style.position='absolute';
		list_sidebar.style.top='-50px';
	}
	
